import React,{ Component } from 'react';
import {
	StyleSheet,
	View,
	Text,
	Platform
} from 'react-native';
import { createTabNavigator,createStackNavigator } from 'react-navigation';
import TrackCommon from './TrackCommon';

const trackTabPage = createTabNavigator({
	ApprovalPending: {
		screen: TrackCommon, // TrackCommon
		navigationOptions:{
			tabBarLabel:'待审批',
		},
	},
	StartedActivity: {
		screen: TrackCommon,
		navigationOptions:{
			tabBarLabel:'已开始',
		},
	},
	CloseActivity: {
		screen: TrackCommon,
		navigationOptions:{
			tabBarLabel:'已关闭',
		},
	}
},{
	initialRouteName:'ApprovalPending',
	tabBarPosition:'top',
	swipeEnabled: false,
	animationEnabled: true,
	lazy:true,
	tabBarOptions:{
		activeTintColor:'#f54545',
		inactiveTintColor:'#000',
		labelStyle: {
		    fontSize: 14,
			lineHeight:Platform.OS==='ios'?40:26,
		    marginTop:0,
        	padding:0,
		},
		style: {
			borderTopWidth:0,
			height:40,
		    backgroundColor: '#fff'
		},
		tabStyle:{

		},
		indicatorStyle: {
            height: 4,
            width:80,
            marginLeft:30,
            backgroundColor:'#f54545',
            opacity:0.8
        },

	}
});


export default createStackNavigator(
{
	TrackIndex: {
		screen: trackTabPage
	}
},{
	initialRouteName:'TrackIndex',
	headerMode: 'none'
}
);
